using System;
using UnityEngine;
using Voodoo.Pattern;

[RequireComponent(typeof(RectTransform))]
public class CoinFxReceiver : MonoBehaviour
{
	public RectTransform m_RectTransform;

	[ContextMenu("Request Coins")]
	public void RequestCoins(Action _OnCoinCollected = null)
	{
		SingletonMB<CoinFxEmitter>.Instance.EmitFxToward(this, new Vector2(0f - (float)Screen.width / 2f, 0f - (float)Screen.height / 2f), delegate
		{
			_OnCoinCollected?.Invoke();
		});
	}
}
